home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / cg.lha / cg / m2c / EvalMod2.c < prev    next >
C/C++ Source or Header  |  1992-11-24  |  48KB  |  1,636 lines

  1. #include "SYSTEM_.h"
  2.  
  3. #ifndef DEFINITION_System
  4. #include "System.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_IO
  8. #include "IO.h"
  9. #endif
  10.  
  11. #ifndef DEFINITION_Tree
  12. #include "Tree.h"
  13. #endif
  14.  
  15. #ifndef DEFINITION_IO
  16. #include "IO.h"
  17. #endif
  18.  
  19. #ifndef DEFINITION_StringMem
  20. #include "StringMem.h"
  21. #endif
  22.  
  23. #ifndef DEFINITION_Idents
  24. #include "Idents.h"
  25. #endif
  26.  
  27. #ifndef DEFINITION_Texts
  28. #include "Texts.h"
  29. #endif
  30.  
  31. #ifndef DEFINITION_Sets
  32. #include "Sets.h"
  33. #endif
  34.  
  35. #ifndef DEFINITION_Relations
  36. #include "Relations.h"
  37. #endif
  38.  
  39. #ifndef DEFINITION_TreeMod2
  40. #include "TreeMod2.h"
  41. #endif
  42.  
  43. #ifndef DEFINITION_EvalMod
  44. #include "EvalMod.h"
  45. #endif
  46.  
  47. #ifndef DEFINITION_Tree
  48. #include "Tree.h"
  49. #endif
  50.  
  51. #ifndef DEFINITION_EvalMod2
  52. #include "EvalMod2.h"
  53. #endif
  54.  
  55. IO_tFile EvalMod2_yyf;
  56. PROC EvalMod2_Exit;
  57.  
  58. static SHORTCARD Count, Start, Stop, Visit, ChildVisit, i, j, k;
  59. static Tree_tTree Node, Attr, Class, AttrClass, Child, Child2, ChildsClass;
  60. static CARDINAL Representative ARGS((CARDINAL i));
  61. static void GenAttribute ARGS((CARDINAL i, BOOLEAN repr));
  62. static Tree_tTree GetClass ARGS((Tree_tTree Class, Idents_tIdent Attribute));
  63. static BOOLEAN CheckUsage ARGS((BITSET Usage));
  64. static void yyAbort ARGS((CHAR yyFunction[], LONGCARD ));
  65. static BOOLEAN yyIsEqual ARGS((BYTE yya[], LONGCARD , BYTE yyb[], LONGCARD ));
  66. struct S_3 {
  67.     union {
  68.         char dummy;
  69.     } U_1;
  70. };
  71. static void WriteType ARGS((Tree_tTree t));
  72. struct S_4 {
  73.     union {
  74.         char dummy;
  75.     } U_1;
  76. };
  77. static void GenEvaluator ARGS((Tree_tTree t));
  78. struct S_5 {
  79.     union {
  80.         char dummy;
  81.     } U_1;
  82. };
  83. static void Generated0 ARGS((Tree_tTree t));
  84. struct S_6 {
  85.     union {
  86.         char dummy;
  87.     } U_1;
  88. };
  89. static void GenFormals ARGS((Tree_tTree t));
  90. struct S_7 {
  91.     union {
  92.         char dummy;
  93.     } U_1;
  94. };
  95. static void GenActualsRight ARGS((Tree_tTree t));
  96. struct S_8 {
  97.     union {
  98.         char dummy;
  99.     } U_1;
  100. };
  101. static void GenActualsLeft ARGS((Tree_tTree t));
  102. struct S_9 {
  103.     union {
  104.         char dummy;
  105.     } U_1;
  106. };
  107. static void GenTempos ARGS((Tree_tTree t));
  108. struct S_10 {
  109.     union {
  110.         char dummy;
  111.     } U_1;
  112. };
  113. static void GenTemposChildren ARGS((Tree_tTree t));
  114. struct S_11 {
  115.     union {
  116.         char dummy;
  117.     } U_1;
  118. };
  119. static void CountTempos ARGS((Tree_tTree t));
  120. struct S_12 {
  121.     union {
  122.         char dummy;
  123.     } U_1;
  124. };
  125. static void CountTemposChildren ARGS((Tree_tTree t));
  126. struct S_13 {
  127.     union {
  128.         char dummy;
  129.     } U_1;
  130. };
  131. static void GenTemposLocal ARGS((Tree_tTree t));
  132. struct S_14 {
  133.     union {
  134.         char dummy;
  135.     } U_1;
  136. };
  137. static void GenDemandProc ARGS((Tree_tTree t));
  138. struct S_15 {
  139.     union {
  140.         char dummy;
  141.     } U_1;
  142. };
  143. static void GenDemandProc2 ARGS((Tree_tTree t));
  144. struct S_16 {
  145.     union {
  146.         char dummy;
  147.     } U_1;
  148. };
  149. static void GenDemandEval ARGS((Tree_tTree t));
  150. struct S_17 {
  151.     union {
  152.         char dummy;
  153.     } U_1;
  154. };
  155. static void yyExit ARGS(());
  156.  
  157.  
  158. static CARDINAL Representative
  159. # ifdef __STDC__
  160. (CARDINAL i)
  161. # else
  162. (i)
  163. CARDINAL i;
  164. # endif
  165. {
  166.   Sets_tSet s;
  167.   CARDINAL r;
  168.   BOOLEAN Stable;
  169.   CARDINAL j, k;
  170.  
  171.   {
  172.     register Tree_yClass *W_1 = &Class->U_1.V_5.Class;
  173.  
  174.     Sets_MakeSet(&s, (LONGCARD)W_1->InstCount);
  175.     Sets_Include(&s, i);
  176.     do {
  177.       Stable = TRUE;
  178.       {
  179.         LONGCARD B_1 = 1, B_2 = W_1->InstCount;
  180.  
  181.         if (B_1 <= B_2)
  182.           for (j = B_1;; j += 1) {
  183.             if (Sets_IsElement(j, &s)) {
  184.               if (IN(Tree_CopyDef, W_1->Instance->A[j - 1].Properties)) {
  185.                 k = W_1->Instance->A[j - 1].CopyArg;
  186.                 if (IN(Tree_Parameter, W_1->Instance->A[k - 1].Attribute->U_1.V_10.Attribute.Properties) && !Sets_IsElement(k, &s)) {
  187.                   Sets_Include(&s, k);
  188.                   Stable = FALSE;
  189.                 }
  190.               }
  191.               if (IN(Tree_CopyUse, W_1->Instance->A[j - 1].Properties)) {
  192.                 {
  193.                   LONGCARD B_3 = 1, B_4 = W_1->InstCount;
  194.  
  195.                   if (B_3 <= B_4)
  196.                     for (k = B_3;; k += 1) {
  197.                       if (IN(Tree_CopyDef, W_1->Instance->A[k - 1].Properties) && IN(Tree_Parameter, W_1->Instance->A[k - 1].Attribute->U_1.V_10.Attribute.Properties) && W_1->Instance->A[k - 1].CopyArg == j && !Sets_IsElement(k, &s)) {
  198.                         Sets_Include(&s, k);
  199.                         Stable = FALSE;
  200.                       }
  201.                       if (k >= B_4) break;
  202.                     }
  203.                 }
  204.               }
  205.             }
  206.             if (j >= B_2) break;
  207.           }
  208.       }
  209.     } while (!Stable);
  210.     r = Sets_Minimum(&s);
  211.     if (r <= W_1->AttrCount) {
  212.       Stable = TRUE;
  213.       j = r + 1;
  214.       for (;;) {
  215.         if (j > W_1->AttrCount) {
  216.           goto EXIT_1;
  217.         }
  218.         if (Sets_IsElement(j, &s)) {
  219.           Stable = FALSE;
  220.           goto EXIT_1;
  221.         }
  222.         INC(j);
  223.       } EXIT_1:;
  224.       if (!Stable) {
  225.         j = 1;
  226.         for (;;) {
  227.           k = W_1->Instance->A[j - 1].Order;
  228.           if (k <= W_1->AttrCount && Sets_IsElement(k, &s)) {
  229.             r = k;
  230.             goto EXIT_2;
  231.           }
  232.           INC(j);
  233.         } EXIT_2:;
  234.       }
  235.     }
  236.     Sets_ReleaseSet(&s);
  237.     return r;
  238.   }
  239. }
  240.  
  241. static void GenAttribute
  242. # ifdef __STDC__
  243. (CARDINAL i, BOOLEAN repr)
  244. # else
  245. (i, repr)
  246. CARDINAL i;
  247. BOOLEAN repr;
  248. # endif
  249. {
  250.   if (repr) {
  251.     {
  252.       register Tree_tInstance *W_2 = &Class->U_1.V_5.Class.Instance->A[i - 1];
  253.  
  254.       if (IN(Tree_Parameter, W_2->Attribute->U_1.V_10.Attribute.Properties) && ((SET_ELEM(Tree_CopyDef) | SET_ELEM(Tree_CopyUse)) & W_2->Properties) != 0X0L) {
  255.         i = Representative(i);
  256.       }
  257.     }
  258.   }
  259.   {
  260.     register Tree_tInstance *W_3 = &Class->U_1.V_5.Class.Instance->A[i - 1];
  261.  
  262.     if (IN(Tree_Virtual, W_3->Properties)) {
  263.       return;
  264.     }
  265.     if (IN(Tree_Left, W_3->Properties)) {
  266.       {
  267.         register Tree_yAttribute *W_4 = &W_3->Attribute->U_1.V_10.Attribute;
  268.  
  269.         if (IN(Tree_Parameter, W_4->Properties)) {
  270.           if (Tree_IdentifyAttribute(Node, W_4->Name) == Tree_NoTree) {
  271.             Tree_WI(Class->U_1.V_5.Class.Name);
  272.             IO_WriteS(Tree_f, (STRING)"yy", 2L);
  273.             Tree_WI(W_4->Name);
  274.           } else {
  275.             IO_WriteS(Tree_f, (STRING)"yy", 2L);
  276.             Tree_WI(W_4->Name);
  277.           }
  278.         } else if (IN(Tree_Demand, W_4->Properties)) {
  279.           if (IN(Tree_Funct, W_4->Properties)) {
  280.             AttrClass = GetClass(Class, W_4->Name);
  281.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  282.             Tree_WI(AttrClass->U_1.V_5.Class.Name);
  283.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  284.             Tree_WI(W_4->Name);
  285.             IO_WriteS(Tree_f, (STRING)" (yyt)", 6L);
  286.           } else if (i != k) {
  287.             Tree_WI(Class->U_1.V_5.Class.Name);
  288.             IO_WriteS(Tree_f, (STRING)"yy", 2L);
  289.             Tree_WI(W_4->Name);
  290.           } else {
  291.             IO_WriteS(Tree_f, (STRING)"yy", 2L);
  292.             Tree_WI(W_4->Name);
  293.           }
  294.         } else {
  295.           IO_WriteS(Tree_f, (STRING)"yyt^.", 5L);
  296.           Tree_WI(Class->U_1.V_5.Class.Name);
  297.           IO_WriteS(Tree_f, (STRING)".", 1L);
  298.           Tree_WI(W_4->Name);
  299.         }
  300.       }
  301.     } else {
  302.       {
  303.         register Tree_yAttribute *W_5 = &W_3->Attribute->U_1.V_10.Attribute;
  304.  
  305.         if (IN(Tree_Parameter, W_5->Properties)) {
  306.           Tree_WI(Class->U_1.V_5.Class.Name);
  307.           IO_WriteS(Tree_f, (STRING)"y", 1L);
  308.           Tree_WI(W_3->Selector->U_1.V_9.Child.Name);
  309.           IO_WriteS(Tree_f, (STRING)"y", 1L);
  310.           Tree_WI(W_5->Name);
  311.         } else if (IN(Tree_Demand, W_5->Properties)) {
  312.           if (IN(Tree_Funct, W_5->Properties)) {
  313.             AttrClass = GetClass(W_3->Selector->U_1.V_9.Child.Class, W_5->Name);
  314.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  315.             Tree_WI(AttrClass->U_1.V_5.Class.Name);
  316.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  317.             Tree_WI(W_5->Name);
  318.             IO_WriteS(Tree_f, (STRING)" (yyt^.", 7L);
  319.             Tree_WI(Class->U_1.V_5.Class.Name);
  320.             IO_WriteS(Tree_f, (STRING)".", 1L);
  321.             Tree_WI(W_3->Selector->U_1.V_9.Child.Name);
  322.             IO_WriteS(Tree_f, (STRING)")", 1L);
  323.           } else {
  324.             Tree_WI(Class->U_1.V_5.Class.Name);
  325.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  326.             Tree_WI(W_3->Selector->U_1.V_9.Child.Name);
  327.             IO_WriteS(Tree_f, (STRING)"y", 1L);
  328.             Tree_WI(W_5->Name);
  329.           }
  330.         } else {
  331.           IO_WriteS(Tree_f, (STRING)"yyt^.", 5L);
  332.           Tree_WI(Class->U_1.V_5.Class.Name);
  333.           IO_WriteS(Tree_f, (STRING)".", 1L);
  334.           Tree_WI(W_3->Selector->U_1.V_9.Child.Name);
  335.           IO_WriteS(Tree_f, (STRING)"^.", 2L);
  336.           Tree_WI(W_3->Selector->U_1.V_9.Child.Type);
  337.           IO_WriteS(Tree_f, (STRING)".", 1L);
  338.           Tree_WI(W_5->Name);
  339.         }
  340.       }
  341.     }
  342.   }
  343. }
  344.  
  345. static Tree_tTree GetClass
  346. # ifdef __STDC__
  347. (Tree_tTree Class, Idents_tIdent Attribute)
  348. # else
  349. (Class, Attribute)
  350. Tree_tTree Class;
  351. Idents_tIdent Attribute;
  352. # endif
  353. {
  354.   while (Class->U_1.V_1.Kind != Tree_NoClass) {
  355.     if (Tree_IdentifyAttribute(Class->U_1.V_5.Class.Attributes, Attribute) != Tree_NoTree) {
  356.       return Class;
  357.     }
  358.     Class = Class->U_1.V_5.Class.BaseClass;
  359.   }
  360.   return Tree_NoTree;
  361. }
  362.  
  363. static BOOLEAN CheckUsage
  364. # ifdef __STDC__
  365. (BITSET Usage)
  366. # else
  367. (Usage)
  368. BITSET Usage;
  369. # endif
  370. {
  371.   SHORTCARD i, i2;
  372.  
  373.   {
  374.     SHORTCARD B_5 = Start, B_6 = Stop;
  375.  
  376.     if (B_5 <= B_6)
  377.       for (i = B_5;; i += 1) {
  378.         i2 = Class->U_1.V_5.Class.Instance->A[i - 1].Order;
  379.         {
  380.           register Tree_tInstance *W_6 = &Class->U_1.V_5.Class.Instance->A[i2 - 1];
  381.  
  382.           if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_First), W_6->Properties) && Child == W_6->Selector && W_6->Attribute->U_1.V_9.Child.Partition <= W_6->Selector->U_1.V_9.Child.Class->U_1.V_5.Class.Visits && IN(W_6->Attribute->U_1.V_9.Child.Partition, Usage)) {
  383.             return TRUE;
  384.           }
  385.           if (SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right), W_6->Properties) && i2 == j) {
  386.             return TRUE;
  387.           }
  388.         }
  389.         if (i >= B_6) break;
  390.       }
  391.   }
  392.   return FALSE;
  393. }
  394.  
  395. static void yyAbort
  396. # ifdef __STDC__
  397. (CHAR yyFunction[], LONGCARD O_1)
  398. # else
  399. (yyFunction, O_1)
  400. CHAR yyFunction[];
  401. LONGCARD O_1;
  402. # endif
  403. {
  404.   OPEN_ARRAY_LOCALS
  405.  
  406.   ALLOC_OPEN_ARRAYS(O_1 * sizeof(CHAR), 1)
  407.   COPY_OPEN_ARRAY(yyFunction, O_1, CHAR)
  408.   IO_WriteS((System_tFile)IO_StdError, (STRING)"Error: module EvalMod2, routine ", 32L);
  409.   IO_WriteS((System_tFile)IO_StdError, yyFunction, O_1);
  410.   IO_WriteS((System_tFile)IO_StdError, (STRING)" failed", 7L);
  411.   IO_WriteNl((System_tFile)IO_StdError);
  412.   (*EvalMod2_Exit)();
  413.   FREE_OPEN_ARRAYS
  414. }
  415.  
  416. static BOOLEAN yyIsEqual
  417. # ifdef __STDC__
  418. (BYTE yya[], LONGCARD O_3, BYTE yyb[], LONGCARD O_2)
  419. # else
  420. (yya, O_3, yyb, O_2)
  421. BYTE yya[];
  422. LONGCARD O_3;
  423. BYTE yyb[];
  424. LONGCARD O_2;
  425. # endif
  426. {
  427.   INTEGER yyi;
  428.   OPEN_ARRAY_LOCALS
  429.  
  430.   ALLOC_OPEN_ARRAYS(O_2 * sizeof(WORD) + O_3 * sizeof(WORD), 2)
  431.   COPY_OPEN_ARRAY(yyb, O_2, WORD)
  432.   COPY_OPEN_ARRAY(yya, O_3, WORD)
  433.   {
  434.     LONGINT B_7 = 0, B_8 = (INTEGER)(O_3 - 1);
  435.  
  436.     if (B_7 <= B_8)
  437.       for (yyi = B_7;; yyi += 1) {
  438.         if (yya[yyi] != yyb[yyi]) {
  439.           FREE_OPEN_ARRAYS
  440.           return FALSE;
  441.         }
  442.         if (yyi >= B_8) break;
  443.       }
  444.   }
  445.   FREE_OPEN_ARRAYS
  446.   return TRUE;
  447. }
  448.  
  449. void EvalMod2_EvalImplMod
  450. # ifdef __STDC__
  451. (Tree_tTree t)
  452. # else
  453. (t)
  454. Tree_tTree t;
  455. # endif
  456. {
  457.   struct S_3 yyTempo;
  458.  
  459.   if (t == Tree_NoTree) {
  460.     return;
  461.   }
  462.   if (t->U_1.V_1.Kind == Tree_Ag) {
  463.     {
  464.       register Tree_yAg *W_7 = &t->U_1.V_26.Ag;
  465.  
  466.       EvalMod_EvalImplHead(t);
  467.       if (!Sets_IsElement(ORD('9'), &Tree_Options)) {
  468.         IO_WriteNl(Tree_f);
  469.         IO_WriteS(Tree_f, (STRING)"PROCEDURE Eval (yyt: ", 21L);
  470.         Tree_WI(Tree_iMain);
  471.         IO_WriteS(Tree_f, (STRING)".", 1L);
  472.         Tree_WI(Tree_itTree);
  473.         IO_WriteS(Tree_f, (STRING)");", 2L);
  474.         IO_WriteNl(Tree_f);
  475.         IO_WriteS(Tree_f, (STRING)" VAR", 4L);
  476.         IO_WriteNl(Tree_f);
  477.         Node = W_7->Classes;
  478.         Class = W_7->Classes;
  479.         Tree_ForallAttributes(Class, (Tree_ProcOfT)GenTemposLocal);
  480.         IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  481.         if (Tree_MaxVisit > 0) {
  482.           Class = W_7->Classes;
  483.           Visit = 1;
  484.           IO_WriteS(Tree_f, (STRING)" yyVisit1", 9L);
  485.           Tree_WI(Class->U_1.V_5.Class.Name);
  486.           IO_WriteS(Tree_f, (STRING)" (yyt", 5L);
  487.           Tree_ForallAttributes(Class, (Tree_ProcOfT)GenActualsLeft);
  488.           IO_WriteS(Tree_f, (STRING)");", 2L);
  489.         }
  490.         IO_WriteS(Tree_f, (STRING)" END Eval;", 10L);
  491.         IO_WriteNl(Tree_f);
  492.       } else {
  493.         IO_WriteNl(Tree_f);
  494.         IO_WriteS(Tree_f, (STRING)"VAR xxStack: CARDINAL;", 22L);
  495.         IO_WriteNl(Tree_f);
  496.         IO_WriteNl(Tree_f);
  497.         IO_WriteS(Tree_f, (STRING)"PROCEDURE Eval (yyt: ", 21L);
  498.         Tree_WI(Tree_iMain);
  499.         IO_WriteS(Tree_f, (STRING)".", 1L);
  500.         Tree_WI(Tree_itTree);
  501.         IO_WriteS(Tree_f, (STRING)");", 2L);
  502.         IO_WriteNl(Tree_f);
  503.         IO_WriteS(Tree_f, (STRING)" VAR xxHigh: BOOLEAN;", 21L);
  504.         IO_WriteNl(Tree_f);
  505.         Node = W_7->Classes;
  506.         Class = W_7->Classes;
  507.         Tree_ForallAttributes(Class, (Tree_ProcOfT)GenTemposLocal);
  508.         IO_WriteS(Tree_f, (STRING)"BEGIN ", 6L);
  509.         IO_WriteNl(Tree_f);
  510.         IO_WriteS(Tree_f, (STRING)" xxStack := MAX (INTEGER);", 26L);
  511.         IO_WriteNl(Tree_f);
  512.         if (Tree_MaxVisit > 0) {
  513.           Class = W_7->Classes;
  514.           Visit = 1;
  515.           IO_WriteS(Tree_f, (STRING)" yyVisit1", 9L);
  516.           Tree_WI(Class->U_1.V_5.Class.Name);
  517.           IO_WriteS(Tree_f, (STRING)" (yyt", 5L);
  518.           Tree_ForallAttributes(Class, (Tree_ProcOfT)GenActualsLeft);
  519.           IO_WriteS(Tree_f, (STRING)");", 2L);
  520.         }
  521.         IO_WriteNl(Tree_f);
  522.         IO_WriteS(Tree_f, (STRING)" IO.WriteS (IO.StdOutput, 'Stacksize ');", 40L);
  523.         IO_WriteNl(Tree_f);
  524.         IO_WriteS(Tree_f, (STRING)" IO.WriteI (IO.StdOutput, CARDINAL (SYSTEM.ADR (xxHigh)) - xxStack, 0);", 71L);
  525.         IO_WriteNl(Tree_f);
  526.         IO_WriteS(Tree_f, (STRING)" IO.WriteNl (IO.StdOutput);", 27L);
  527.         IO_WriteNl(Tree_f);
  528.         IO_WriteS(Tree_f, (STRING)"END Eval;", 9L);
  529.         IO_WriteNl(Tree_f);
  530.       }
  531.       IO_WriteNl(Tree_f);
  532.       Tree_ForallClasses(W_7->Classes, (Tree_ProcOfT)GenDemandProc);
  533.       Tree_ForallClasses(W_7->Classes, (Tree_ProcOfT)EvalMod2_EvalImplMod);
  534.       IO_WriteS(Tree_f, (STRING)"PROCEDURE Begin", 15L);
  535.       Tree_WI(W_7->EvalName);
  536.       IO_WriteS(Tree_f, (STRING)";", 1L);
  537.       IO_WriteNl(Tree_f);
  538.       IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  539.       IO_WriteNl(Tree_f);
  540.       TreeMod2_WriteLine(W_7->EvalCodes->U_1.V_12.Codes.BeginLine);
  541.       Texts_WriteText(Tree_f, W_7->EvalCodes->U_1.V_12.Codes.Begin);
  542.       Node = W_7->Modules;
  543.       while (Node->U_1.V_1.Kind == Tree_Module) {
  544.         TreeMod2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.BeginLine);
  545.         Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Begin);
  546.         Node = Node->U_1.V_43.Module.Next;
  547.       }
  548.       IO_WriteS(Tree_f, (STRING)" END Begin", 10L);
  549.       Tree_WI(W_7->EvalName);
  550.       IO_WriteS(Tree_f, (STRING)";", 1L);
  551.       IO_WriteNl(Tree_f);
  552.       IO_WriteNl(Tree_f);
  553.       IO_WriteS(Tree_f, (STRING)"PROCEDURE Close", 15L);
  554.       Tree_WI(W_7->EvalName);
  555.       IO_WriteS(Tree_f, (STRING)";", 1L);
  556.       IO_WriteNl(Tree_f);
  557.       IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  558.       IO_WriteNl(Tree_f);
  559.       TreeMod2_WriteLine(W_7->EvalCodes->U_1.V_12.Codes.CloseLine);
  560.       Texts_WriteText(Tree_f, W_7->EvalCodes->U_1.V_12.Codes.Close);
  561.       Node = W_7->Modules;
  562.       while (Node->U_1.V_1.Kind == Tree_Module) {
  563.         TreeMod2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.CloseLine);
  564.         Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Close);
  565.         Node = Node->U_1.V_43.Module.Next;
  566.       }
  567.       IO_WriteS(Tree_f, (STRING)" END Close", 10L);
  568.       Tree_WI(W_7->EvalName);
  569.       IO_WriteS(Tree_f, (STRING)";", 1L);
  570.       IO_WriteNl(Tree_f);
  571.       IO_WriteNl(Tree_f);
  572.       IO_WriteS(Tree_f, (STRING)"BEGIN", 5L);
  573.       IO_WriteNl(Tree_f);
  574.       if (Sets_IsElement(ORD('X'), &Tree_Options)) {
  575.         IO_WriteS(Tree_f, (STRING)" yyf := IO.StdOutput;", 21L);
  576.         IO_WriteNl(Tree_f);
  577.       }
  578.       IO_WriteS(Tree_f, (STRING)"END ", 4L);
  579.       Tree_WI(W_7->EvalName);
  580.       IO_WriteS(Tree_f, (STRING)".", 1L);
  581.       IO_WriteNl(Tree_f);
  582.       return;
  583.     }
  584.   }
  585.   if (t->U_1.V_1.Kind == Tree_Class) {
  586.     {
  587.       register Tree_yClass *W_8 = &t->U_1.V_5.Class;
  588.  
  589.       if ((Tree_NoCodeClass & W_8->Properties) != 0X0L) {
  590.         return;
  591.       }
  592.       if (IN(Tree_Referenced, W_8->Properties)) {
  593.         W_8->Generated = 0;
  594.         Tree_ForallClasses(W_8->Extensions, (Tree_ProcOfT)Generated0);
  595.         {
  596.           SHORTCARD B_9 = 1, B_10 = W_8->Visits;
  597.  
  598.           if (B_9 <= B_10)
  599.             for (Visit = B_9;; Visit += 1) {
  600.               IO_WriteS(Tree_f, (STRING)"PROCEDURE yyVisit", 17L);
  601.               Tree_WN((LONGINT)Visit);
  602.               Tree_WI(W_8->Name);
  603.               IO_WriteS(Tree_f, (STRING)" (yyt: ", 7L);
  604.               Tree_WI(Tree_iMain);
  605.               IO_WriteS(Tree_f, (STRING)".", 1L);
  606.               Tree_WI(Tree_itTree);
  607.               Node = t;
  608.               Class = t;
  609.               Tree_ForallAttributes(t, (Tree_ProcOfT)GenFormals);
  610.               IO_WriteS(Tree_f, (STRING)");", 2L);
  611.               IO_WriteNl(Tree_f);
  612.               IO_WriteS(Tree_f, (STRING)" VAR yyTempo: RECORD CASE : INTEGER OF", 38L);
  613.               IO_WriteNl(Tree_f);
  614.               Node = t;
  615.               GenTempos(t);
  616.               Tree_ForallClasses(W_8->Extensions, (Tree_ProcOfT)GenTempos);
  617.               IO_WriteS(Tree_f, (STRING)" END; END;", 10L);
  618.               IO_WriteNl(Tree_f);
  619.               TreeMod2_WriteLine(Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.LocalLine);
  620.               Texts_WriteText(Tree_f, Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.Local);
  621.               Node = Tree_TreeRoot->U_1.V_26.Ag.Modules;
  622.               while (Node->U_1.V_1.Kind == Tree_Module) {
  623.                 TreeMod2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.LocalLine);
  624.                 Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Local);
  625.                 Node = Node->U_1.V_43.Module.Next;
  626.               }
  627.               if (Sets_IsElement(ORD('9'), &Tree_Options)) {
  628.                 IO_WriteS(Tree_f, (STRING)" VAR xxLow: BOOLEAN;", 20L);
  629.                 IO_WriteNl(Tree_f);
  630.                 IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  631.                 IO_WriteNl(Tree_f);
  632.                 IO_WriteS(Tree_f, (STRING)"  xxStack := General.Min (xxStack, CARDINAL (SYSTEM.ADR (xxLow)));", 66L);
  633.                 IO_WriteNl(Tree_f);
  634.               } else {
  635.                 IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  636.                 IO_WriteNl(Tree_f);
  637.               }
  638.               IO_WriteS(Tree_f, (STRING)"  WITH yyTempo DO", 17L);
  639.               IO_WriteNl(Tree_f);
  640.               IO_WriteS(Tree_f, (STRING)"   CASE yyt^.Kind OF", 20L);
  641.               IO_WriteNl(Tree_f);
  642.               if (IN(Tree_cOAG, Tree_GrammarClass)) {
  643.                 Node = t;
  644.                 GenEvaluator(t);
  645.                 Tree_ForallClasses(W_8->Extensions, (Tree_ProcOfT)GenEvaluator);
  646.               }
  647.               IO_WriteS(Tree_f, (STRING)"   ELSE", 7L);
  648.               IO_WriteNl(Tree_f);
  649.               if (Sets_IsElement(ORD('Z'), &Tree_Options)) {
  650.                 IO_WriteS(Tree_f, (STRING)"    yyVisitParent (yyt);", 24L);
  651.                 IO_WriteNl(Tree_f);
  652.               }
  653.               IO_WriteS(Tree_f, (STRING)"   END;", 7L);
  654.               IO_WriteNl(Tree_f);
  655.               IO_WriteS(Tree_f, (STRING)"  END;", 6L);
  656.               IO_WriteNl(Tree_f);
  657.               IO_WriteS(Tree_f, (STRING)" END yyVisit", 12L);
  658.               Tree_WN((LONGINT)Visit);
  659.               Tree_WI(W_8->Name);
  660.               IO_WriteS(Tree_f, (STRING)";", 1L);
  661.               IO_WriteNl(Tree_f);
  662.               IO_WriteNl(Tree_f);
  663.               if (Visit >= B_10) break;
  664.             }
  665.         }
  666.       }
  667.       return;
  668.     }
  669.   }
  670. }
  671.  
  672. static void WriteType
  673. # ifdef __STDC__
  674. (Tree_tTree t)
  675. # else
  676. (t)
  677. Tree_tTree t;
  678. # endif
  679. {
  680.   struct S_4 yyTempo;
  681.  
  682.   if (t == Tree_NoTree) {
  683.     return;
  684.   }
  685.   if (t->U_1.V_1.Kind == Tree_Class) {
  686.     {
  687.       register Tree_yClass *W_9 = &t->U_1.V_5.Class;
  688.  
  689.       if ((Tree_NoCodeClass & W_9->Properties) != 0X0L) {
  690.         return;
  691.       }
  692.       if (IN(Tree_Trace, W_9->Properties)) {
  693.         IO_WriteS(Tree_f, (STRING)"| ", 2L);
  694.         Tree_WI(Tree_iMain);
  695.         IO_WriteS(Tree_f, (STRING)".", 1L);
  696.         Tree_WI(W_9->Name);
  697.         IO_WriteS(Tree_f, (STRING)": yyWriteS ('", 13L);
  698.         Tree_WI(W_9->Name);
  699.         IO_WriteS(Tree_f, (STRING)"');", 3L);
  700.         IO_WriteNl(Tree_f);
  701.       }
  702.       return;
  703.     }
  704.   }
  705. }
  706.  
  707. static void GenEvaluator
  708. # ifdef __STDC__
  709. (Tree_tTree t)
  710. # else
  711. (t)
  712. Tree_tTree t;
  713. # endif
  714. {
  715.   struct S_5 yyTempo;
  716.  
  717.   if (t == Tree_NoTree) {
  718.     return;
  719.   }
  720.   switch (t->U_1.V_1.Kind) {
  721.   case Tree_Class:;
  722.     {
  723.       register Tree_yClass *W_10 = &t->U_1.V_5.Class;
  724.  
  725.       if ((Tree_NoCodeClass & W_10->Properties) != 0X0L) {
  726.         return;
  727.       }
  728.       if (W_10->Generated == W_10->InstCount) {
  729.         return;
  730.       }
  731.       IO_WriteS(Tree_f, (STRING)"| ", 2L);
  732.       Tree_WI(Tree_iMain);
  733.       IO_WriteS(Tree_f, (STRING)".", 1L);
  734.       Tree_WI(W_10->Name);
  735.       IO_WriteS(Tree_f, (STRING)":", 1L);
  736.       IO_WriteNl(Tree_f);
  737.       Start = W_10->Generated + 1;
  738.       for (;;) {
  739.         if (W_10->Generated == W_10->InstCount) {
  740.           goto EXIT_3;
  741.         }
  742.         INC(W_10->Generated);
  743.         {
  744.           register Tree_tInstance *W_11 = &W_10->Instance->A[W_10->Instance->A[W_10->Generated - 1].Order - 1];
  745.  
  746.           if (IN(Tree_Left, W_11->Properties) && W_11->Attribute->U_1.V_9.Child.Partition > Visit) {
  747.             DEC(W_10->Generated);
  748.             goto EXIT_3;
  749.           }
  750.         }
  751.       } EXIT_3:;
  752.       Stop = W_10->Generated;
  753.       Class = t;
  754.       {
  755.         SHORTCARD B_11 = Start, B_12 = Stop;
  756.  
  757.         if (B_11 <= B_12)
  758.           for (Start = B_11;; Start += 1) {
  759.             i = W_10->Instance->A[Start - 1].Order;
  760.             {
  761.               register Tree_tInstance *W_12 = &W_10->Instance->A[i - 1];
  762.  
  763.               if (SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_First), W_12->Properties) && ((SET_ELEM(Tree_Dummy) | SET_ELEM(Tree_Virtual) | SET_ELEM(Tree_Demand)) & W_12->Properties) == 0X0L) {
  764.                 GenDemandEval(t);
  765.                 if (Sets_IsElement(ORD('X'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  766.                   IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, '", 19L);
  767.                   Tree_WI(W_12->Selector->U_1.V_9.Child.Name);
  768.                   IO_WriteS(Tree_f, (STRING)":", 1L);
  769.                   Tree_WI(W_12->Attribute->U_1.V_9.Child.Name);
  770.                   IO_WriteS(Tree_f, (STRING)"');", 3L);
  771.                   IO_WriteNl(Tree_f);
  772.                   if (W_12->Action != ADR(W_12->Action)) {
  773.                     GenEvaluator(W_12->Action);
  774.                   }
  775.                   IO_WriteNl(Tree_f);
  776.                   if (W_12->Attribute->U_1.V_1.Kind == Tree_Child || W_12->Attribute->U_1.V_10.Attribute.Type == Tree_itTree) {
  777.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  778.                     Tree_WI(Tree_itTree);
  779.                     IO_WriteS(Tree_f, (STRING)" (", 2L);
  780.                     GenAttribute((LONGCARD)i, TRUE);
  781.                     IO_WriteS(Tree_f, (STRING)")", 1L);
  782.                     IO_WriteNl(Tree_f);
  783.                   } else {
  784.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  785.                     Tree_WI(W_12->Attribute->U_1.V_9.Child.Type);
  786.                     IO_WriteS(Tree_f, (STRING)" (", 2L);
  787.                     GenAttribute((LONGCARD)i, TRUE);
  788.                     IO_WriteS(Tree_f, (STRING)") yyWriteNl;", 12L);
  789.                     IO_WriteNl(Tree_f);
  790.                   }
  791.                 } else if (Sets_IsElement(ORD('Y'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  792.                   IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, '", 19L);
  793.                   Tree_WI(W_12->Selector->U_1.V_9.Child.Name);
  794.                   IO_WriteS(Tree_f, (STRING)":", 1L);
  795.                   Tree_WI(W_12->Attribute->U_1.V_9.Child.Name);
  796.                   IO_WriteS(Tree_f, (STRING)"');", 3L);
  797.                   IO_WriteNl(Tree_f);
  798.                   if (W_12->Action != ADR(W_12->Action)) {
  799.                     GenEvaluator(W_12->Action);
  800.                   }
  801.                 } else {
  802.                   if (W_12->Action != ADR(W_12->Action)) {
  803.                     GenEvaluator(W_12->Action);
  804.                   }
  805.                 }
  806.               }
  807.               if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left) | SET_ELEM(Tree_First), W_12->Properties) && ((SET_ELEM(Tree_Dummy) | SET_ELEM(Tree_Virtual) | SET_ELEM(Tree_Demand)) & W_12->Properties) == 0X0L) {
  808.                 GenDemandEval(t);
  809.                 if (Sets_IsElement(ORD('X'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  810.                   IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, '", 19L);
  811.                   Tree_WI(W_12->Attribute->U_1.V_9.Child.Name);
  812.                   IO_WriteS(Tree_f, (STRING)"');", 3L);
  813.                   IO_WriteNl(Tree_f);
  814.                   if (W_12->Action != ADR(W_12->Action)) {
  815.                     GenEvaluator(W_12->Action);
  816.                   }
  817.                   IO_WriteNl(Tree_f);
  818.                   if (IN(Tree_Test, W_12->Properties)) {
  819.                     IO_WriteS(Tree_f, (STRING)"writeBOOLEAN (yyb) yyWriteNl;", 29L);
  820.                     IO_WriteNl(Tree_f);
  821.                   } else if (W_12->Attribute->U_1.V_1.Kind == Tree_Child || W_12->Attribute->U_1.V_10.Attribute.Type == Tree_itTree) {
  822.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  823.                     Tree_WI(Tree_itTree);
  824.                     IO_WriteS(Tree_f, (STRING)" (", 2L);
  825.                     GenAttribute((LONGCARD)i, TRUE);
  826.                     IO_WriteS(Tree_f, (STRING)")", 1L);
  827.                     IO_WriteNl(Tree_f);
  828.                   } else {
  829.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  830.                     Tree_WI(W_12->Attribute->U_1.V_9.Child.Type);
  831.                     IO_WriteS(Tree_f, (STRING)" (", 2L);
  832.                     GenAttribute((LONGCARD)i, TRUE);
  833.                     IO_WriteS(Tree_f, (STRING)") yyWriteNl;", 12L);
  834.                     IO_WriteNl(Tree_f);
  835.                   }
  836.                 } else if (Sets_IsElement(ORD('Y'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  837.                   IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, '", 19L);
  838.                   Tree_WI(W_12->Attribute->U_1.V_9.Child.Name);
  839.                   IO_WriteS(Tree_f, (STRING)"');", 3L);
  840.                   IO_WriteNl(Tree_f);
  841.                   if (W_12->Action != ADR(W_12->Action)) {
  842.                     GenEvaluator(W_12->Action);
  843.                   }
  844.                 } else {
  845.                   if (W_12->Action != ADR(W_12->Action)) {
  846.                     GenEvaluator(W_12->Action);
  847.                   }
  848.                 }
  849.               }
  850.               if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_First), W_12->Properties) && W_12->Attribute->U_1.V_9.Child.Partition <= W_12->Selector->U_1.V_9.Child.Class->U_1.V_5.Class.Visits) {
  851.                 if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  852.                   IO_WriteS(Tree_f, (STRING)"yyWriteVisit (yyt, '", 20L);
  853.                   Tree_WI(W_12->Selector->U_1.V_9.Child.Name);
  854.                   IO_WriteS(Tree_f, (STRING)" ", 1L);
  855.                   Tree_WN((LONGINT)W_12->Attribute->U_1.V_9.Child.Partition);
  856.                   IO_WriteS(Tree_f, (STRING)"');", 3L);
  857.                   IO_WriteNl(Tree_f);
  858.                 }
  859.                 ChildVisit = W_12->Attribute->U_1.V_9.Child.Partition;
  860.                 Child = W_12->Selector;
  861.                 IO_WriteS(Tree_f, (STRING)"yyVisit", 7L);
  862.                 Tree_WN((LONGINT)ChildVisit);
  863.                 Tree_WI(Child->U_1.V_9.Child.Type);
  864.                 IO_WriteS(Tree_f, (STRING)" (yyt^.", 7L);
  865.                 Tree_WI(W_10->Name);
  866.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  867.                 Tree_WI(Child->U_1.V_9.Child.Name);
  868.                 Tree_ForallAttributes(Child->U_1.V_9.Child.Class, (Tree_ProcOfT)GenActualsRight);
  869.                 IO_WriteS(Tree_f, (STRING)");", 2L);
  870.                 IO_WriteNl(Tree_f);
  871.               }
  872.             }
  873.             if (Start >= B_12) break;
  874.           }
  875.       }
  876.       if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  877.         IO_WriteS(Tree_f, (STRING)"yyVisitParent (yyt);", 20L);
  878.         IO_WriteNl(Tree_f);
  879.       }
  880.       return;
  881.     }
  882.     break;
  883.   case Tree_Assign:;
  884.     {
  885.       register Tree_yAssign *W_13 = &t->U_1.V_36.Assign;
  886.  
  887.       TreeMod2_WriteLine(W_13->Pos);
  888.       GenEvaluator(W_13->Results);
  889.       IO_WriteS(Tree_f, (STRING)":=", 2L);
  890.       GenEvaluator(W_13->Arguments);
  891.       IO_WriteS(Tree_f, (STRING)";", 1L);
  892.       IO_WriteNl(Tree_f);
  893.       return;
  894.     }
  895.     break;
  896.   case Tree_Copy:;
  897.     {
  898.       register Tree_yCopy *W_14 = &t->U_1.V_37.Copy;
  899.  
  900.       j = Class->U_1.V_5.Class.Instance->A[i - 1].CopyArg;
  901.       if (IN(Tree_Parameter, Class->U_1.V_5.Class.Instance->A[i - 1].Attribute->U_1.V_10.Attribute.Properties) && IN(Tree_Parameter, Class->U_1.V_5.Class.Instance->A[j - 1].Attribute->U_1.V_10.Attribute.Properties)) {
  902.         if (IN(Tree_Left, Class->U_1.V_5.Class.Instance->A[i - 1].Properties) && IN(Tree_Left, Class->U_1.V_5.Class.Instance->A[j - 1].Properties)) {
  903.           TreeMod2_WriteLine(W_14->Pos);
  904.           GenAttribute((LONGCARD)i, FALSE);
  905.           IO_WriteS(Tree_f, (STRING)" :=", 3L);
  906.           GenEvaluator(W_14->Arguments);
  907.           IO_WriteS(Tree_f, (STRING)";", 1L);
  908.           IO_WriteNl(Tree_f);
  909.         }
  910.       } else {
  911.         TreeMod2_WriteLine(W_14->Pos);
  912.         GenEvaluator(W_14->Results);
  913.         IO_WriteS(Tree_f, (STRING)":=", 2L);
  914.         GenEvaluator(W_14->Arguments);
  915.         IO_WriteS(Tree_f, (STRING)";", 1L);
  916.         IO_WriteNl(Tree_f);
  917.       }
  918.       return;
  919.     }
  920.     break;
  921.   case Tree_TargetCode:;
  922.     {
  923.       register Tree_yTargetCode *W_15 = &t->U_1.V_38.TargetCode;
  924.  
  925.       TreeMod2_WriteLine(W_15->Pos);
  926.       GenEvaluator(W_15->Code);
  927.       IO_WriteNl(Tree_f);
  928.       return;
  929.     }
  930.     break;
  931.   case Tree_Check:;
  932.     {
  933.       register Tree_yCheck *W_16 = &t->U_1.V_40.Check;
  934.  
  935.       TreeMod2_WriteLine(W_16->Pos);
  936.       if (W_16->Condition != Tree_NoTree) {
  937.         if (Sets_IsElement(ORD('X'), &Tree_Options)) {
  938.           IO_WriteS(Tree_f, (STRING)"yyb := ", 7L);
  939.           GenEvaluator(W_16->Condition);
  940.           IO_WriteS(Tree_f, (STRING)"; IF NOT yyb THEN ", 18L);
  941.         } else {
  942.           IO_WriteS(Tree_f, (STRING)"IF NOT (", 8L);
  943.           GenEvaluator(W_16->Condition);
  944.           IO_WriteS(Tree_f, (STRING)") THEN ", 7L);
  945.         }
  946.         GenEvaluator(W_16->Statement);
  947.         IO_WriteNl(Tree_f);
  948.         if (W_16->Actions->U_1.V_1.Kind == Tree_Check) {
  949.           IO_WriteS(Tree_f, (STRING)"ELSE ", 5L);
  950.           GenEvaluator(W_16->Actions);
  951.         }
  952.         IO_WriteS(Tree_f, (STRING)" END;", 5L);
  953.         IO_WriteNl(Tree_f);
  954.       } else {
  955.         if (Sets_IsElement(ORD('X'), &Tree_Options)) {
  956.           IO_WriteS(Tree_f, (STRING)"yyb := FALSE; ", 14L);
  957.         }
  958.         GenEvaluator(W_16->Statement);
  959.         IO_WriteS(Tree_f, (STRING)";", 1L);
  960.         IO_WriteNl(Tree_f);
  961.         GenEvaluator(W_16->Actions);
  962.       }
  963.       return;
  964.     }
  965.     break;
  966.   case Tree_Designator:;
  967.     {
  968.       register Tree_yDesignator *W_17 = &t->U_1.V_15.Designator;
  969.  
  970.       Child2 = Tree_IdentifyAttribute(Class, W_17->Selector);
  971.       if (Child2 != Tree_NoTree) {
  972.         ChildsClass = Child2->U_1.V_9.Child.Class;
  973.         Attr = Tree_IdentifyAttribute(ChildsClass, W_17->Attribute);
  974.         if (Attr != Tree_NoTree) {
  975.           GenAttribute((LONGCARD)(Class->U_1.V_5.Class.AttrCount + Child2->U_1.V_9.Child.InstOffset + Attr->U_1.V_10.Attribute.AttrIndex), TRUE);
  976.         } else {
  977.           Tree_WI(W_17->Selector);
  978.           IO_WriteS(Tree_f, (STRING)":", 1L);
  979.           Tree_WI(W_17->Attribute);
  980.         }
  981.       } else {
  982.         Tree_WI(W_17->Selector);
  983.         IO_WriteS(Tree_f, (STRING)":", 1L);
  984.         Tree_WI(W_17->Attribute);
  985.       }
  986.       GenEvaluator(W_17->Next);
  987.       return;
  988.     }
  989.     break;
  990.   case Tree_Ident:;
  991.     {
  992.       register Tree_yIdent *W_18 = &t->U_1.V_16.Ident;
  993.  
  994.       Attr = Tree_IdentifyAttribute(Class, W_18->Attribute);
  995.       if (Attr != Tree_NoTree) {
  996.         GenAttribute((LONGCARD)Attr->U_1.V_10.Attribute.AttrIndex, TRUE);
  997.       } else {
  998.         Tree_WI(W_18->Attribute);
  999.       }
  1000.       GenEvaluator(W_18->Next);
  1001.       return;
  1002.     }
  1003.     break;
  1004.   case Tree_Any:;
  1005.     {
  1006.       register Tree_yAny *W_19 = &t->U_1.V_18.Any;
  1007.  
  1008.       StringMem_WriteString(Tree_f, W_19->Code);
  1009.       GenEvaluator(W_19->Next);
  1010.       return;
  1011.     }
  1012.     break;
  1013.   case Tree_Anys:;
  1014.     {
  1015.       register Tree_yAnys *W_20 = &t->U_1.V_19.Anys;
  1016.  
  1017.       GenEvaluator(W_20->Layouts);
  1018.       GenEvaluator(W_20->Next);
  1019.       return;
  1020.     }
  1021.     break;
  1022.   case Tree_LayoutAny:;
  1023.     {
  1024.       register Tree_yLayoutAny *W_21 = &t->U_1.V_22.LayoutAny;
  1025.  
  1026.       StringMem_WriteString(Tree_f, W_21->Code);
  1027.       GenEvaluator(W_21->Next);
  1028.       return;
  1029.     }
  1030.     break;
  1031.   default :
  1032.     break;
  1033.   }
  1034. }
  1035.  
  1036. static void Generated0
  1037. # ifdef __STDC__
  1038. (Tree_tTree t)
  1039. # else
  1040. (t)
  1041. Tree_tTree t;
  1042. # endif
  1043. {
  1044.   struct S_6 yyTempo;
  1045.  
  1046.   if (t == Tree_NoTree) {
  1047.     return;
  1048.   }
  1049.   if (t->U_1.V_1.Kind == Tree_Class) {
  1050.     {
  1051.       register Tree_yClass *W_22 = &t->U_1.V_5.Class;
  1052.  
  1053.       W_22->Generated = 0;
  1054.       return;
  1055.     }
  1056.   }
  1057. }
  1058.  
  1059. static void GenFormals
  1060. # ifdef __STDC__
  1061. (Tree_tTree t)
  1062. # else
  1063. (t)
  1064. Tree_tTree t;
  1065. # endif
  1066. {
  1067.   struct S_7 yyTempo;
  1068.  
  1069.   if (t == Tree_NoTree) {
  1070.     return;
  1071.   }
  1072.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1073.     {
  1074.       register Tree_yAttribute *W_23 = &t->U_1.V_10.Attribute;
  1075.  
  1076.       if (IN(Tree_Parameter, W_23->Properties) && IN(Visit, W_23->Usage)) {
  1077.         IO_WriteS(Tree_f, (STRING)"; VAR ", 6L);
  1078.         GenAttribute((LONGCARD)W_23->AttrIndex, FALSE);
  1079.         IO_WriteS(Tree_f, (STRING)": ", 2L);
  1080.         Tree_WI(W_23->Type);
  1081.       }
  1082.       return;
  1083.     }
  1084.   }
  1085. }
  1086.  
  1087. static void GenActualsRight
  1088. # ifdef __STDC__
  1089. (Tree_tTree t)
  1090. # else
  1091. (t)
  1092. Tree_tTree t;
  1093. # endif
  1094. {
  1095.   struct S_8 yyTempo;
  1096.  
  1097.   if (t == Tree_NoTree) {
  1098.     return;
  1099.   }
  1100.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1101.     {
  1102.       register Tree_yAttribute *W_24 = &t->U_1.V_10.Attribute;
  1103.  
  1104.       if (IN(Tree_Parameter, W_24->Properties) && IN(ChildVisit, W_24->Usage)) {
  1105.         IO_WriteS(Tree_f, (STRING)", ", 2L);
  1106.         GenAttribute((LONGCARD)(Class->U_1.V_5.Class.AttrCount + Child->U_1.V_9.Child.InstOffset + W_24->AttrIndex), TRUE);
  1107.       }
  1108.       return;
  1109.     }
  1110.   }
  1111. }
  1112.  
  1113. static void GenActualsLeft
  1114. # ifdef __STDC__
  1115. (Tree_tTree t)
  1116. # else
  1117. (t)
  1118. Tree_tTree t;
  1119. # endif
  1120. {
  1121.   struct S_9 yyTempo;
  1122.  
  1123.   if (t == Tree_NoTree) {
  1124.     return;
  1125.   }
  1126.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1127.     {
  1128.       register Tree_yAttribute *W_25 = &t->U_1.V_10.Attribute;
  1129.  
  1130.       if (IN(Tree_Parameter, W_25->Properties) && IN(Visit, W_25->Usage)) {
  1131.         IO_WriteS(Tree_f, (STRING)", ", 2L);
  1132.         GenAttribute((LONGCARD)W_25->AttrIndex, FALSE);
  1133.       }
  1134.       return;
  1135.     }
  1136.   }
  1137. }
  1138.  
  1139. static void GenTempos
  1140. # ifdef __STDC__
  1141. (Tree_tTree t)
  1142. # else
  1143. (t)
  1144. Tree_tTree t;
  1145. # endif
  1146. {
  1147.   struct S_10 yyTempo;
  1148.  
  1149.   if (t == Tree_NoTree) {
  1150.     return;
  1151.   }
  1152.   if (t->U_1.V_1.Kind == Tree_Class) {
  1153.     {
  1154.       register Tree_yClass *W_26 = &t->U_1.V_5.Class;
  1155.  
  1156.       if ((Tree_NoCodeClass & W_26->Properties) != 0X0L) {
  1157.         return;
  1158.       }
  1159.       Start = W_26->Generated + 1;
  1160.       for (;;) {
  1161.         if (W_26->Generated == W_26->InstCount) {
  1162.           goto EXIT_4;
  1163.         }
  1164.         INC(W_26->Generated);
  1165.         {
  1166.           register Tree_tInstance *W_27 = &W_26->Instance->A[W_26->Instance->A[W_26->Generated - 1].Order - 1];
  1167.  
  1168.           if (IN(Tree_Left, W_27->Properties) && W_27->Attribute->U_1.V_9.Child.Partition > Visit) {
  1169.             DEC(W_26->Generated);
  1170.             goto EXIT_4;
  1171.           }
  1172.         }
  1173.       } EXIT_4:;
  1174.       Stop = W_26->Generated;
  1175.       W_26->Generated = Start - 1;
  1176.       Count = 0;
  1177.       Class = t;
  1178.       Tree_ForallAttributes(t, (Tree_ProcOfT)CountTempos);
  1179.       if (Count > 0) {
  1180.         IO_WriteS(Tree_f, (STRING)" | ", 3L);
  1181.         Tree_WI(Tree_iMain);
  1182.         IO_WriteS(Tree_f, (STRING)".", 1L);
  1183.         Tree_WI(W_26->Name);
  1184.         IO_WriteS(Tree_f, (STRING)":", 1L);
  1185.         IO_WriteNl(Tree_f);
  1186.         Class = t;
  1187.         Tree_ForallAttributes(t, (Tree_ProcOfT)GenTempos);
  1188.       }
  1189.       return;
  1190.     }
  1191.   }
  1192.   if (t->U_1.V_1.Kind == Tree_Child) {
  1193.     {
  1194.       register Tree_yChild *W_28 = &t->U_1.V_9.Child;
  1195.  
  1196.       Child = t;
  1197.       Tree_ForallAttributes(W_28->Class, (Tree_ProcOfT)GenTemposChildren);
  1198.       return;
  1199.     }
  1200.   }
  1201.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1202.     {
  1203.       register Tree_yAttribute *W_29 = &t->U_1.V_10.Attribute;
  1204.  
  1205.       if (IN(Tree_Parameter, W_29->Properties) && Tree_IdentifyAttribute(Node, W_29->Name) == Tree_NoTree && IN(Visit, W_29->Usage) || IN(Tree_Demand, W_29->Properties) && !IN(Tree_Funct, W_29->Properties) && W_29->AttrIndex != k) {
  1206.         IO_WriteS(Tree_f, (STRING)"  ", 2L);
  1207.         GenAttribute((LONGCARD)W_29->AttrIndex, FALSE);
  1208.         IO_WriteS(Tree_f, (STRING)": ", 2L);
  1209.         Tree_WI(W_29->Type);
  1210.         IO_WriteS(Tree_f, (STRING)";", 1L);
  1211.         IO_WriteNl(Tree_f);
  1212.       }
  1213.       return;
  1214.     }
  1215.   }
  1216. }
  1217.  
  1218. static void GenTemposChildren
  1219. # ifdef __STDC__
  1220. (Tree_tTree t)
  1221. # else
  1222. (t)
  1223. Tree_tTree t;
  1224. # endif
  1225. {
  1226.   struct S_11 yyTempo;
  1227.  
  1228.   if (t == Tree_NoTree) {
  1229.     return;
  1230.   }
  1231.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1232.     {
  1233.       register Tree_yAttribute *W_30 = &t->U_1.V_10.Attribute;
  1234.  
  1235.       if (IN(Tree_Parameter, W_30->Properties) || IN(Tree_Demand, W_30->Properties) && !IN(Tree_Funct, W_30->Properties)) {
  1236.         j = Class->U_1.V_5.Class.AttrCount + Child->U_1.V_9.Child.InstOffset + W_30->AttrIndex;
  1237.         if (IN(Tree_Demand, W_30->Properties) || ((SET_ELEM(Tree_CopyDef) | SET_ELEM(Tree_CopyUse)) & Class->U_1.V_5.Class.Instance->A[j - 1].Properties) == 0X0L || j == Representative((LONGCARD)j)) {
  1238.           if (CheckUsage(W_30->Usage)) {
  1239.             IO_WriteS(Tree_f, (STRING)"  ", 2L);
  1240.             GenAttribute((LONGCARD)j, FALSE);
  1241.             IO_WriteS(Tree_f, (STRING)": ", 2L);
  1242.             Tree_WI(W_30->Type);
  1243.             IO_WriteS(Tree_f, (STRING)";", 1L);
  1244.             IO_WriteNl(Tree_f);
  1245.           }
  1246.         }
  1247.       }
  1248.       return;
  1249.     }
  1250.   }
  1251. }
  1252.  
  1253. static void CountTempos
  1254. # ifdef __STDC__
  1255. (Tree_tTree t)
  1256. # else
  1257. (t)
  1258. Tree_tTree t;
  1259. # endif
  1260. {
  1261.   struct S_12 yyTempo;
  1262.  
  1263.   if (t == Tree_NoTree) {
  1264.     return;
  1265.   }
  1266.   if (t->U_1.V_1.Kind == Tree_Child) {
  1267.     {
  1268.       register Tree_yChild *W_31 = &t->U_1.V_9.Child;
  1269.  
  1270.       Child = t;
  1271.       Tree_ForallAttributes(W_31->Class, (Tree_ProcOfT)CountTemposChildren);
  1272.       return;
  1273.     }
  1274.   }
  1275.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1276.     {
  1277.       register Tree_yAttribute *W_32 = &t->U_1.V_10.Attribute;
  1278.  
  1279.       if (IN(Tree_Parameter, W_32->Properties) && Tree_IdentifyAttribute(Node, W_32->Name) == Tree_NoTree && IN(Visit, W_32->Usage) || IN(Tree_Demand, W_32->Properties) && !IN(Tree_Funct, W_32->Properties) && W_32->AttrIndex != k) {
  1280.         INC(Count);
  1281.       }
  1282.       return;
  1283.     }
  1284.   }
  1285. }
  1286.  
  1287. static void CountTemposChildren
  1288. # ifdef __STDC__
  1289. (Tree_tTree t)
  1290. # else
  1291. (t)
  1292. Tree_tTree t;
  1293. # endif
  1294. {
  1295.   struct S_13 yyTempo;
  1296.  
  1297.   if (t == Tree_NoTree) {
  1298.     return;
  1299.   }
  1300.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1301.     {
  1302.       register Tree_yAttribute *W_33 = &t->U_1.V_10.Attribute;
  1303.  
  1304.       if (IN(Tree_Parameter, W_33->Properties) || IN(Tree_Demand, W_33->Properties) && !IN(Tree_Funct, W_33->Properties)) {
  1305.         j = Class->U_1.V_5.Class.AttrCount + Child->U_1.V_9.Child.InstOffset + W_33->AttrIndex;
  1306.         if (IN(Tree_Demand, W_33->Properties) || ((SET_ELEM(Tree_CopyDef) | SET_ELEM(Tree_CopyUse)) & Class->U_1.V_5.Class.Instance->A[j - 1].Properties) == 0X0L || j == Representative((LONGCARD)j)) {
  1307.           if (CheckUsage(W_33->Usage)) {
  1308.             INC(Count);
  1309.           }
  1310.         }
  1311.       }
  1312.       return;
  1313.     }
  1314.   }
  1315. }
  1316.  
  1317. static void GenTemposLocal
  1318. # ifdef __STDC__
  1319. (Tree_tTree t)
  1320. # else
  1321. (t)
  1322. Tree_tTree t;
  1323. # endif
  1324. {
  1325.   struct S_14 yyTempo;
  1326.  
  1327.   if (t == Tree_NoTree) {
  1328.     return;
  1329.   }
  1330.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1331.     {
  1332.       register Tree_yAttribute *W_34 = &t->U_1.V_10.Attribute;
  1333.  
  1334.       if (IN(Tree_Parameter, W_34->Properties)) {
  1335.         IO_WriteS(Tree_f, (STRING)"  ", 2L);
  1336.         GenAttribute((LONGCARD)W_34->AttrIndex, FALSE);
  1337.         IO_WriteS(Tree_f, (STRING)": ", 2L);
  1338.         Tree_WI(W_34->Type);
  1339.         IO_WriteS(Tree_f, (STRING)";", 1L);
  1340.         IO_WriteNl(Tree_f);
  1341.       }
  1342.       return;
  1343.     }
  1344.   }
  1345. }
  1346.  
  1347. static void GenDemandProc
  1348. # ifdef __STDC__
  1349. (Tree_tTree t)
  1350. # else
  1351. (t)
  1352. Tree_tTree t;
  1353. # endif
  1354. {
  1355.   struct S_15 yyTempo;
  1356.  
  1357.   if (t == Tree_NoTree) {
  1358.     return;
  1359.   }
  1360.   if (t->U_1.V_1.Kind == Tree_Class) {
  1361.     {
  1362.       register Tree_yClass *W_35 = &t->U_1.V_5.Class;
  1363.  
  1364.       if ((Tree_NoCodeClass & W_35->Properties) != 0X0L) {
  1365.         return;
  1366.       }
  1367.       Node = t;
  1368.       Tree_ForallAttributes(W_35->Attributes, (Tree_ProcOfT)GenDemandProc);
  1369.       return;
  1370.     }
  1371.   }
  1372.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1373.     {
  1374.       register Tree_yAttribute *W_36 = &t->U_1.V_10.Attribute;
  1375.  
  1376.       if (IN(Tree_Demand, W_36->Properties)) {
  1377.         Class = Node;
  1378.         k = W_36->AttrIndex;
  1379.         if (IN(Tree_Funct, W_36->Properties)) {
  1380.           IO_WriteS(Tree_f, (STRING)"PROCEDURE y", 11L);
  1381.           Tree_WI(Class->U_1.V_5.Class.Name);
  1382.           IO_WriteS(Tree_f, (STRING)"y", 1L);
  1383.           Tree_WI(W_36->Name);
  1384.           IO_WriteS(Tree_f, (STRING)" (yyt: ", 7L);
  1385.           Tree_WI(Tree_iMain);
  1386.           IO_WriteS(Tree_f, (STRING)".", 1L);
  1387.           Tree_WI(Tree_itTree);
  1388.           IO_WriteS(Tree_f, (STRING)"): ", 3L);
  1389.           Tree_WI(W_36->Type);
  1390.           IO_WriteS(Tree_f, (STRING)";", 1L);
  1391.           IO_WriteNl(Tree_f);
  1392.         } else {
  1393.           IO_WriteS(Tree_f, (STRING)"PROCEDURE y", 11L);
  1394.           Tree_WI(Class->U_1.V_5.Class.Name);
  1395.           IO_WriteS(Tree_f, (STRING)"y", 1L);
  1396.           Tree_WI(W_36->Name);
  1397.           IO_WriteS(Tree_f, (STRING)" (yyt: ", 7L);
  1398.           Tree_WI(Tree_iMain);
  1399.           IO_WriteS(Tree_f, (STRING)".", 1L);
  1400.           Tree_WI(Tree_itTree);
  1401.           IO_WriteS(Tree_f, (STRING)"; VAR ", 6L);
  1402.           GenAttribute((LONGCARD)W_36->AttrIndex, FALSE);
  1403.           IO_WriteS(Tree_f, (STRING)": ", 2L);
  1404.           Tree_WI(W_36->Type);
  1405.           IO_WriteS(Tree_f, (STRING)");", 2L);
  1406.           IO_WriteNl(Tree_f);
  1407.         }
  1408.         IO_WriteS(Tree_f, (STRING)" VAR yyTempo: RECORD CASE : INTEGER OF", 38L);
  1409.         IO_WriteNl(Tree_f);
  1410.         GenTempos(Class);
  1411.         Tree_ForallClasses(Class->U_1.V_5.Class.Extensions, (Tree_ProcOfT)GenTempos);
  1412.         IO_WriteS(Tree_f, (STRING)" END; END;", 10L);
  1413.         IO_WriteNl(Tree_f);
  1414.         IO_WriteS(Tree_f, (STRING)" BEGIN", 6L);
  1415.         IO_WriteNl(Tree_f);
  1416.         IO_WriteS(Tree_f, (STRING)"  WITH yyTempo DO", 17L);
  1417.         IO_WriteNl(Tree_f);
  1418.         IO_WriteS(Tree_f, (STRING)"   CASE yyt^.Kind OF", 20L);
  1419.         IO_WriteNl(Tree_f);
  1420.         if (IN(Tree_cOAG, Tree_GrammarClass)) {
  1421.           i = W_36->AttrIndex;
  1422.           Class = Node;
  1423.           GenDemandProc2(Class);
  1424.           Tree_ForallClasses(Class->U_1.V_5.Class.Extensions, (Tree_ProcOfT)GenDemandProc2);
  1425.           Class = Node;
  1426.         }
  1427.         IO_WriteS(Tree_f, (STRING)"   ELSE", 7L);
  1428.         IO_WriteNl(Tree_f);
  1429.         IO_WriteS(Tree_f, (STRING)"   END;", 7L);
  1430.         IO_WriteNl(Tree_f);
  1431.         IO_WriteS(Tree_f, (STRING)"  END;", 6L);
  1432.         IO_WriteNl(Tree_f);
  1433.         IO_WriteS(Tree_f, (STRING)" END y", 6L);
  1434.         Tree_WI(Class->U_1.V_5.Class.Name);
  1435.         IO_WriteS(Tree_f, (STRING)"y", 1L);
  1436.         Tree_WI(W_36->Name);
  1437.         IO_WriteS(Tree_f, (STRING)";", 1L);
  1438.         IO_WriteNl(Tree_f);
  1439.         IO_WriteNl(Tree_f);
  1440.         k = 0;
  1441.       }
  1442.       return;
  1443.     }
  1444.   }
  1445. }
  1446.  
  1447. static void GenDemandProc2
  1448. # ifdef __STDC__
  1449. (Tree_tTree t)
  1450. # else
  1451. (t)
  1452. Tree_tTree t;
  1453. # endif
  1454. {
  1455.   struct S_16 yyTempo;
  1456.  
  1457.   if (t == Tree_NoTree) {
  1458.     return;
  1459.   }
  1460.   if (t->U_1.V_1.Kind == Tree_Class) {
  1461.     {
  1462.       register Tree_yClass *W_37 = &t->U_1.V_5.Class;
  1463.  
  1464.       IO_WriteS(Tree_f, (STRING)"| ", 2L);
  1465.       Tree_WI(Tree_iMain);
  1466.       IO_WriteS(Tree_f, (STRING)".", 1L);
  1467.       Tree_WI(W_37->Name);
  1468.       IO_WriteS(Tree_f, (STRING)":", 1L);
  1469.       IO_WriteNl(Tree_f);
  1470.       {
  1471.         register Tree_tInstance *W_38 = &W_37->Instance->A[i - 1];
  1472.  
  1473.         Class = t;
  1474.         GenDemandEval(t);
  1475.         if (IN(Tree_Funct, W_38->Properties)) {
  1476.           GenDemandProc2(W_38->Action);
  1477.         } else {
  1478.           GenEvaluator(W_38->Action);
  1479.           IO_WriteNl(Tree_f);
  1480.         }
  1481.       }
  1482.       return;
  1483.     }
  1484.   }
  1485.   if (t->U_1.V_1.Kind == Tree_Assign) {
  1486.     {
  1487.       register Tree_yAssign *W_39 = &t->U_1.V_36.Assign;
  1488.  
  1489.       IO_WriteS(Tree_f, (STRING)"RETURN ", 7L);
  1490.       GenEvaluator(W_39->Arguments);
  1491.       IO_WriteS(Tree_f, (STRING)";", 1L);
  1492.       IO_WriteNl(Tree_f);
  1493.       return;
  1494.     }
  1495.   }
  1496.   if (t->U_1.V_1.Kind == Tree_Copy) {
  1497.     {
  1498.       register Tree_yCopy *W_40 = &t->U_1.V_37.Copy;
  1499.  
  1500.       IO_WriteS(Tree_f, (STRING)"RETURN ", 7L);
  1501.       GenEvaluator(W_40->Arguments);
  1502.       IO_WriteS(Tree_f, (STRING)";", 1L);
  1503.       IO_WriteNl(Tree_f);
  1504.       return;
  1505.     }
  1506.   }
  1507.   if (t->U_1.V_1.Kind == Tree_TargetCode) {
  1508.     {
  1509.       register Tree_yTargetCode *W_41 = &t->U_1.V_38.TargetCode;
  1510.  
  1511.       IO_WriteS(Tree_f, (STRING)"NoBlockStatementForDemandFunctionAttributes;", 44L);
  1512.       IO_WriteNl(Tree_f);
  1513.       return;
  1514.     }
  1515.   }
  1516. }
  1517.  
  1518. static void GenDemandEval
  1519. # ifdef __STDC__
  1520. (Tree_tTree t)
  1521. # else
  1522. (t)
  1523. Tree_tTree t;
  1524. # endif
  1525. {
  1526.   struct S_17 yyTempo;
  1527.  
  1528.   if (t == Tree_NoTree) {
  1529.     return;
  1530.   }
  1531.   if (t->U_1.V_1.Kind == Tree_Class) {
  1532.     {
  1533.       register Tree_yClass *W_42 = &t->U_1.V_5.Class;
  1534.  
  1535.       {
  1536.         SHORTCARD B_13 = 1, B_14 = W_42->InstCount;
  1537.  
  1538.         if (B_13 <= B_14)
  1539.           for (j = B_13;; j += 1) {
  1540.             {
  1541.               register Tree_tInstance *W_43 = &W_42->Instance->A[j - 1];
  1542.  
  1543.               if (Relations_IsRelated((LONGINT)i, (LONGINT)j, W_42->DP) && IN(Tree_Demand, W_43->Properties) && !IN(Tree_Funct, W_43->Properties)) {
  1544.                 if (IN(Tree_Left, W_43->Properties)) {
  1545.                   AttrClass = GetClass(t, W_43->Attribute->U_1.V_9.Child.Name);
  1546.                   IO_WriteS(Tree_f, (STRING)"    y", 5L);
  1547.                   Tree_WI(AttrClass->U_1.V_5.Class.Name);
  1548.                   IO_WriteS(Tree_f, (STRING)"y", 1L);
  1549.                   Tree_WI(W_43->Attribute->U_1.V_9.Child.Name);
  1550.                   IO_WriteS(Tree_f, (STRING)" (yyt, ", 7L);
  1551.                   GenAttribute((LONGCARD)j, FALSE);
  1552.                   IO_WriteS(Tree_f, (STRING)");", 2L);
  1553.                   IO_WriteNl(Tree_f);
  1554.                 } else {
  1555.                   AttrClass = GetClass(W_43->Selector->U_1.V_9.Child.Class, W_43->Attribute->U_1.V_9.Child.Name);
  1556.                   IO_WriteS(Tree_f, (STRING)"    y", 5L);
  1557.                   Tree_WI(AttrClass->U_1.V_5.Class.Name);
  1558.                   IO_WriteS(Tree_f, (STRING)"y", 1L);
  1559.                   Tree_WI(W_43->Attribute->U_1.V_9.Child.Name);
  1560.                   IO_WriteS(Tree_f, (STRING)" (yyt^.", 7L);
  1561.                   Tree_WI(W_42->Name);
  1562.                   IO_WriteS(Tree_f, (STRING)".", 1L);
  1563.                   Tree_WI(W_43->Selector->U_1.V_9.Child.Name);
  1564.                   IO_WriteS(Tree_f, (STRING)", ", 2L);
  1565.                   GenAttribute((LONGCARD)j, FALSE);
  1566.                   IO_WriteS(Tree_f, (STRING)");", 2L);
  1567.                   IO_WriteNl(Tree_f);
  1568.                 }
  1569.               }
  1570.             }
  1571.             if (j >= B_14) break;
  1572.           }
  1573.       }
  1574.       return;
  1575.     }
  1576.   }
  1577. }
  1578.  
  1579. void EvalMod2_BeginEvalMod2
  1580. # ifdef __STDC__
  1581. ()
  1582. # else
  1583. ()
  1584. # endif
  1585. {
  1586.   k = 0;
  1587. }
  1588.  
  1589. void EvalMod2_CloseEvalMod2
  1590. # ifdef __STDC__
  1591. ()
  1592. # else
  1593. ()
  1594. # endif
  1595. {
  1596. }
  1597.  
  1598. static void yyExit
  1599. # ifdef __STDC__
  1600. ()
  1601. # else
  1602. ()
  1603. # endif
  1604. {
  1605.   IO_CloseIO();
  1606.   Exit(1L);
  1607. }
  1608.  
  1609. void BEGIN_EvalMod2()
  1610. {
  1611.   static BOOLEAN has_been_called = FALSE;
  1612.  
  1613.   if (!has_been_called) {
  1614.     has_been_called = TRUE;
  1615.  
  1616.     BEGIN_IO();
  1617.     BEGIN_Tree();
  1618.     BEGIN_System();
  1619.     BEGIN_IO();
  1620.     BEGIN_Tree();
  1621.     BEGIN_IO();
  1622.     BEGIN_StringMem();
  1623.     BEGIN_Idents();
  1624.     BEGIN_Texts();
  1625.     BEGIN_Sets();
  1626.     BEGIN_Relations();
  1627.     BEGIN_TreeMod2();
  1628.     BEGIN_EvalMod();
  1629.     BEGIN_Tree();
  1630.  
  1631.     EvalMod2_yyf = IO_StdOutput;
  1632.     EvalMod2_Exit = yyExit;
  1633.     EvalMod2_BeginEvalMod2();
  1634.   }
  1635. }
  1636.